#include <stdio.h>
#include <unistd.h>
#include <sys/types.h>

int main()
{
    while (1)
    {
        // printf("mypid:%d, ppid:%d\n", getpid(), getppid());
        // fflush(stdin);
        printf("pid:%d\n", getpid());
        printf("更改cwd之前\n");
        
        sleep(20);
        chdir("/home/ZhengTongren");
        sleep(10);
        printf("after change cwd\n");

        FILE* fp = fopen("readme.md", "w");
        fclose(fp);
    }
    return 0;
}
